export default {
  split: function (str, reg) {
    return typeof str !== 'string' ? [] : str.trim().length === 0 ? [] : str.split(reg)
  },
  toFixed: function (str, num) {
    return parseFloat(str).toFixed(num)
  },
  floor: function (num) {
    return Math.floor(parseFloat(num))
  },
  isIncludes: function (arr, str) {
    return arr.indexOf(str) > -1
  },
  // 截取字符
  geSliceStr: function (v) {
    return v.length > 5 ? v.slice(0, 5) + '...' : v
  },
}
